FIG. 1 shows the structure of a transport stream. A transport stream standardized by ISO (International Organization for Standardization)/IEC (International Electrotechnical Commission) 13818-1 has transport stream packets (TS packets). Each TS packet has a fixed length of 188 bytes as shown in FIG. 1 (A) and has a TS header, adaptation field and/or payload. The TS header of the TS packet includes a sync byte for detecting the start of the TS packet, a transport error indicator for indicating whether there is a bit error in the TS packet, a PID (Packet Identifier) for identifying the packet, etc.
FIG. 1 (C) shows a structure of the adaptation field. The adaptation field is an area for providing additional information on each stream and a stuffing byte(s) (non-effective data byte). The adaptation field has an adaptation field length indicating the length of the adaptation field, a discontinuity indicator for indicating that the system clock is reset by the PID packet and a re-start, a random access indicator indicating a start of a sequence header of a video or an audio frame, a stream priority indicator indicating important portions of each stream. The adaptation field may further have optional field information and flag information for identifying information provided in the optional field.
FIG. 1 (D) shows a structure of the optional field. The optional field has PCR (Program Clock Reference) that is time reference information. The PCR is information that allows a receiver of the transport stream to recover a system clock of 27 MHz, and is that a 27 MHz system clock is encoded by 33bits. The PCR has two fields of a PCR base and a PCR extension. A value of the PCR indicates a packet generation time on time axis of the stream and the time unit is indicated as a counted value by accumulating an STC (System Time Clock) of 27 MHz (3.7037 nsec).
The optional field may have an OPCR indicating an original PCR, a splice count down indicating the number of transport packets of the same PID until an editable point.
In FIG. 1 (B), a payload following the TS header has packet data of a PES (Packetized Elementary Stream) of a video or audio bit stream.
FIG. 2 shows a structure of a PES packet. The PES packet has a packet start code indicating the start of a packet, packet length, flag information indicating whether there are PTS (Presentation Time Stamp) and/or DTS (Decoding Time Stamp) wherein the PTS is presentation time control information and the DTS is decoding time control information, a PES header length indicating a length of the PES header, a stuffing byte(s) for keeping the length of the packet data length constant whether PTS, DTS, PTS and/or DTS exist or not, and packet data of video or audio bit stream (ES: Elementary Stream).
When the video and audio data packets are separated from a transport stream, use of the PID for identifying each packet provided in the TS header allows separating the video and audio data packets. If the TS packets include a plurality of content data the video or audio packet of a desired content can be separated based on the PID. Specifically, a PAT (Program Association Table) of which PID=“0x000 is received. The PAT indicates the PID of a PMT (Program Mapped Table) that shows structures of channels and details of the channels included in the transport stream. Use of the PID of the PMT indicated by the PAT allows selecting TS packets indicating the PMT of a desired channel.
The PMT may have a stream format identifier that shows which standard the video and audio bit stream constituting a program correspond to, and the PIDs of the video and audio bit stream. Then, the video and audio packets of a desired channel can be separated using the PIDs indicated by the PMT.
If the transport stream includes packets representing information on a content, for example, an EIT (Event Information Table) session, it is separated based on the PID wherein the EIT indicates name, start time, time length, content, genre, etc. of the program.
Video and audio data are obtained by decoding the elementary streams by extracting the video and audio PES packet data from the separated video and audio packets as described above. The elementary stream includes a picture type in the picture header and then it is identified as one of I, P and B pictures.
FIG. 3 shows a portion of a reference model of a transport system target decoder (TSTD) in an MPEG system.
A demultiplexer 11 of the transport system target decoder 10 separates video and audio packets based on the PID and provides the video packets to a transport buffer (TBn) 12 and the audio packets to a transport buffer (TBn) 16. The transport buffer (TBn) 12 stores the provided video packets and provides multi-buffer (MBn) 13 at a constant rate. The multi-buffer (MBn) 13 buffers multi-jitters and overhead of the PES to adjust the data transfer speed to an elementary stream buffer (EBn) 14. The elementary stream buffer (EBn) 14 is equivalent to a VBV (Video Buffering Verifier) buffer that prevents overflow and underflow when a video decoder 15 decodes the video elementary stream. A transport buffer (TBn) 16 stores the provided audio packets to provide them to buffer (Bn) 17 at a constant rate. The buffer (Bn) 17 is a buffer that prevents overflow and underflow when an audio decoder 18 decodes the audio elementary stream.
The video decoder 15 and audio decoder 18 extract the video and audio data from the buffers according to the time information of the time stamps PTS/DTS for decoding and presentation. The video and audio have a unit of decoding/presentation called “access unit”. The DTS indicates a decoding time of the access unit and the PTS does a presentation time. The time stamps PTS/DTS are a clock of 90 kHz units encoded by 33 bits and synchronized to the PCR as the reference.
PCR, PES, etc. analysis has been conducted as a transport stream analysis analyzing such a transport stream described above.
FIG. 4 is a PCR analysis result that shows the relationship between PCR arrival times and the PCR time calculated based on the PCR wherein PCR indicators are provided on a coordinate plane of which horizontal axis is elapsed time and vertical axis is the PCR time. The PCR time is the time provided by multiplying a count value described in the PCR and a time of one period of the system clock (27 MHz). If the PCR is accurate, the PCR time calculated based on the respective PCRs and the arrival times of PCR1, PCR2, . . . have a proportional relationship so that the PCR indicators are substantially aligned on a linear line. Then, a receiver end of the transport stream controls the STC to make a gap between the PCR and STC be “0” to synchronize transmitter and receiver ends of the transport stream.
FIG. 5 shows an analysis result of PCR accuracy, for example. This analysis shows a time difference (a count error between an STC count value and a count value provided by the PCR) between an arrival time and a PCR time calculated based on the PCR at each position (each arrival time of the PCR) that the PCR packet exists on the stream. In FIG. 5, the horizontal axis shows arrival times and the vertical axis shows a time difference (a count error between a STC count value and a count value provided by the PCR) between an arrival time and a PCR time calculated based on the PCR. The STC is controlled to make a difference from the PCR be “0” so that a time difference (count error) is almost “0” when the PCR is accurate as shown in FIG. 5. If the time difference (count error) is large, it apparently shows that the PCR does not have an accurate value.
FIG. 6 also shows an analysis result of time stamps PTS/DTS. In FIG. 6, PTS/DTS values (PTS/DTS×11.11 μsec) are placed with respect to each access unit. The vertical axis shows an elapsed time from the DTS value to the PTS value of the access unit. An “X” mark indicates a PTS, a “+” mark does a DTS. In FIG. 6, an additional summary display on an access unit selected by a cursor is provided to display various information regarding the access unit.
FIG. 7 is another method of displaying analysis results of time stamps PTS/DTS wherein the horizontal axis is a time axis and it shows relationship between an arrival time of an access unit and time provided by the time stamps PTS/DTS described in each access unit. In FIG. 7, a position indicated with “A” is an arrival time of an access unit, a time provided by the PTS described in the access unit is indicated at a “P” position, and a time provided by the DTS is indicated at a “D” position.